{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import re"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "df = pd.read_csv(\"../../data/steam/data.raw.csv\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(18842, 7)"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(8637, 7)"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# remove elements that are not games\n",
    "df = df[df['type'] == 'game']\n",
    "df.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "def clean_txt(txt):\n",
    "    # remove non ascii characters\n",
    "    txt2 = ''.join([i if ord(i) < 128 else ' ' for i in str(txt)])\n",
    "    \n",
    "    # no xml entities either\n",
    "    txt3 = re.sub('&[^;]{1,6};',' ',txt2)\n",
    "    \n",
    "    # clean whitespace\n",
    "    txt4 = re.sub('\\s+',' ',txt3).lstrip().rstrip()\n",
    "    \n",
    "    \n",
    "    return txt4\n",
    "\n",
    "df['name'] = df['name'].map(lambda value: clean_txt(value))\n",
    "df['detailed_description'] = df['detailed_description'].map(lambda value: clean_txt(value))\n",
    "df['about_the_game'] = df['about_the_game'].map(lambda value: clean_txt(value))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(8522, 7)"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# taking out duplicate names\n",
    "df = df.drop_duplicates(['name'])\n",
    "df.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(8520, 7)"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# no empty names (these are probably due to games whose name was in chinese or japanese)\n",
    "df = df.drop(df.apply(lambda row: row['name'].strip() == '',axis=1))\n",
    "df.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>appid</th>\n",
       "      <th>name</th>\n",
       "      <th>detailed_description</th>\n",
       "      <th>about_the_game</th>\n",
       "      <th>categories</th>\n",
       "      <th>genres</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>30</td>\n",
       "      <td>Day of Defeat</td>\n",
       "      <td>enlist in an intense brand of axis vs. allied ...</td>\n",
       "      <td>enlist in an intense brand of axis vs. allied ...</td>\n",
       "      <td>Multi-player,Valve Anti-Cheat enabled</td>\n",
       "      <td>Action</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>40</td>\n",
       "      <td>Deathmatch Classic</td>\n",
       "      <td>enjoy fast-paced multiplayer gaming with death...</td>\n",
       "      <td>enjoy fast-paced multiplayer gaming with death...</td>\n",
       "      <td>Multi-player,Valve Anti-Cheat enabled</td>\n",
       "      <td>Action</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>50</td>\n",
       "      <td>Half-Life: Opposing Force</td>\n",
       "      <td>return to the black mesa research facility as ...</td>\n",
       "      <td>return to the black mesa research facility as ...</td>\n",
       "      <td>Single-player,Multi-player,Valve Anti-Cheat en...</td>\n",
       "      <td>Action</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>60</td>\n",
       "      <td>Ricochet</td>\n",
       "      <td>a futuristic action game that challenges your ...</td>\n",
       "      <td>a futuristic action game that challenges your ...</td>\n",
       "      <td>Multi-player,Valve Anti-Cheat enabled</td>\n",
       "      <td>Action</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>70</td>\n",
       "      <td>Half-Life</td>\n",
       "      <td>named game of the year by over 50 publications...</td>\n",
       "      <td>named game of the year by over 50 publications...</td>\n",
       "      <td>Single-player,Multi-player,Valve Anti-Cheat en...</td>\n",
       "      <td>Action</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>80</td>\n",
       "      <td>Counter-Strike: Condition Zero</td>\n",
       "      <td>with its extensive tour of duty campaign, a ne...</td>\n",
       "      <td>with its extensive tour of duty campaign, a ne...</td>\n",
       "      <td>Single-player,Multi-player,Valve Anti-Cheat en...</td>\n",
       "      <td>Action</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>130</td>\n",
       "      <td>Half-Life: Blue Shift</td>\n",
       "      <td>made by gearbox software and originally releas...</td>\n",
       "      <td>made by gearbox software and originally releas...</td>\n",
       "      <td>Single-player</td>\n",
       "      <td>Action</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>220</td>\n",
       "      <td>Half-Life 2</td>\n",
       "      <td>1998. half-life sends a shock through the game...</td>\n",
       "      <td>1998. half-life sends a shock through the game...</td>\n",
       "      <td>Single-player,Steam Achievements,Steam Trading...</td>\n",
       "      <td>Action</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>240</td>\n",
       "      <td>Counter-Strike: Source</td>\n",
       "      <td>the next installment of the world's # 1 online...</td>\n",
       "      <td>the next installment of the world's # 1 online...</td>\n",
       "      <td>Multi-player,Cross-Platform Multiplayer,Steam ...</td>\n",
       "      <td>Action</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>280</td>\n",
       "      <td>Half-Life: Source</td>\n",
       "      <td>winner of over 50 game of the year awards, hal...</td>\n",
       "      <td>winner of over 50 game of the year awards, hal...</td>\n",
       "      <td>Single-player</td>\n",
       "      <td>Action</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>300</td>\n",
       "      <td>Day of Defeat: Source</td>\n",
       "      <td>day of defeat offers intense online action gam...</td>\n",
       "      <td>day of defeat offers intense online action gam...</td>\n",
       "      <td>Multi-player,Cross-Platform Multiplayer,Steam ...</td>\n",
       "      <td>Action</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>320</td>\n",
       "      <td>Half-Life 2: Deathmatch</td>\n",
       "      <td>fast multiplayer action set in the half-life 2...</td>\n",
       "      <td>fast multiplayer action set in the half-life 2...</td>\n",
       "      <td>Multi-player,Valve Anti-Cheat enabled,Includes...</td>\n",
       "      <td>Action</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>340</td>\n",
       "      <td>Half-Life 2: Lost Coast</td>\n",
       "      <td>originally planned as a section of the highway...</td>\n",
       "      <td>originally planned as a section of the highway...</td>\n",
       "      <td>Single-player,Commentary available</td>\n",
       "      <td>Action</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>360</td>\n",
       "      <td>Half-Life Deathmatch: Source</td>\n",
       "      <td>half-life deathmatch: source is a recreation o...</td>\n",
       "      <td>half-life deathmatch: source is a recreation o...</td>\n",
       "      <td>Multi-player,Valve Anti-Cheat enabled</td>\n",
       "      <td>Action</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>380</td>\n",
       "      <td>Half-Life 2: Episode One</td>\n",
       "      <td>half-life 2 has sold over 4 million copies wor...</td>\n",
       "      <td>half-life 2 has sold over 4 million copies wor...</td>\n",
       "      <td>Single-player,Steam Achievements,Captions avai...</td>\n",
       "      <td>Action</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>400</td>\n",
       "      <td>Portal</td>\n",
       "      <td>portal is a new single player game from valve....</td>\n",
       "      <td>portal is a new single player game from valve....</td>\n",
       "      <td>Single-player,Steam Achievements,Captions avai...</td>\n",
       "      <td>Action</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>420</td>\n",
       "      <td>Half-Life 2: Episode Two</td>\n",
       "      <td>half-life 2: episode two is the second in a tr...</td>\n",
       "      <td>half-life 2: episode two is the second in a tr...</td>\n",
       "      <td>Single-player,Steam Achievements,Captions avai...</td>\n",
       "      <td>Action</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>440</td>\n",
       "      <td>Team Fortress 2</td>\n",
       "      <td>the tough break update is now available!about ...</td>\n",
       "      <td>\"the most fun you can have online\" - pc gamer ...</td>\n",
       "      <td>Multi-player,Cross-Platform Multiplayer,Steam ...</td>\n",
       "      <td>Action,Free to Play</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>500</td>\n",
       "      <td>Left 4 Dead</td>\n",
       "      <td>steam big pictureabout the gamefrom valve (the...</td>\n",
       "      <td>from valve (the creators of counter-strike, ha...</td>\n",
       "      <td>Single-player,Multi-player,Co-op,Steam Achieve...</td>\n",
       "      <td>Action</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>550</td>\n",
       "      <td>Left 4 Dead 2</td>\n",
       "      <td>set in the zombie apocalypse, left 4 dead 2 (l...</td>\n",
       "      <td>set in the zombie apocalypse, left 4 dead 2 (l...</td>\n",
       "      <td>Single-player,Multi-player,Co-op,Steam Achieve...</td>\n",
       "      <td>Action</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>570</td>\n",
       "      <td>Dota 2</td>\n",
       "      <td>dota is a competitive game of action and strat...</td>\n",
       "      <td>dota is a competitive game of action and strat...</td>\n",
       "      <td>Multi-player,Co-op,Steam Trading Cards,Steam W...</td>\n",
       "      <td>Action,Free to Play,Strategy</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>620</td>\n",
       "      <td>Portal 2</td>\n",
       "      <td>portal 2 draws from the award-winning formula ...</td>\n",
       "      <td>portal 2 draws from the award-winning formula ...</td>\n",
       "      <td>Single-player,Co-op,Steam Achievements,Full co...</td>\n",
       "      <td>Action,Adventure</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>630</td>\n",
       "      <td>Alien Swarm</td>\n",
       "      <td>alien swarm is a game and source sdk release f...</td>\n",
       "      <td>alien swarm is a game and source sdk release f...</td>\n",
       "      <td>Single-player,Multi-player,Co-op,Steam Achieve...</td>\n",
       "      <td>Action</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>730</td>\n",
       "      <td>Counter-Strike: Global Offensive</td>\n",
       "      <td>counter-strike: global offensive (cs: go) will...</td>\n",
       "      <td>counter-strike: global offensive (cs: go) will...</td>\n",
       "      <td>Multi-player,Steam Achievements,Full controlle...</td>\n",
       "      <td>Action</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>108</th>\n",
       "      <td>1002</td>\n",
       "      <td>Rag Doll Kung Fu</td>\n",
       "      <td>featuring a wide collection of single and mult...</td>\n",
       "      <td>featuring a wide collection of single and mult...</td>\n",
       "      <td>Single-player,Multi-player</td>\n",
       "      <td>Indie</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110</th>\n",
       "      <td>1200</td>\n",
       "      <td>Red Orchestra: Ostfront 41-45</td>\n",
       "      <td>fight in the theatre of war that changed the w...</td>\n",
       "      <td>fight in the theatre of war that changed the w...</td>\n",
       "      <td>Multi-player,Steam Achievements,Valve Anti-Che...</td>\n",
       "      <td>Action</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>112</th>\n",
       "      <td>1250</td>\n",
       "      <td>Killing Floor</td>\n",
       "      <td>steam halloween sale - kf and all dlc - 75% of...</td>\n",
       "      <td>killing floor is a co-op survival horror fps s...</td>\n",
       "      <td>Single-player,Multi-player,Cross-Platform Mult...</td>\n",
       "      <td>Action</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>116</th>\n",
       "      <td>1300</td>\n",
       "      <td>SiN Episodes: Emergence</td>\n",
       "      <td>you are john blade, commander of hardcorps, an...</td>\n",
       "      <td>you are john blade, commander of hardcorps, an...</td>\n",
       "      <td>Single-player,Stats</td>\n",
       "      <td>Action</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>119</th>\n",
       "      <td>1500</td>\n",
       "      <td>Darwinia</td>\n",
       "      <td>combining fast-paced action with strategic bat...</td>\n",
       "      <td>combining fast-paced action with strategic bat...</td>\n",
       "      <td>Single-player</td>\n",
       "      <td>Indie,Strategy</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>121</th>\n",
       "      <td>1510</td>\n",
       "      <td>Uplink</td>\n",
       "      <td>you play an uplink agent who makes a living by...</td>\n",
       "      <td>you play an uplink agent who makes a living by...</td>\n",
       "      <td>Single-player</td>\n",
       "      <td>Indie,Strategy</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18786</th>\n",
       "      <td>457230</td>\n",
       "      <td>Atlas Reactor VR Character Viewer</td>\n",
       "      <td>outwit to outlive in atlas reactor, the genre-...</td>\n",
       "      <td>outwit to outlive in atlas reactor, the genre-...</td>\n",
       "      <td>Single-player</td>\n",
       "      <td>Strategy</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18788</th>\n",
       "      <td>457420</td>\n",
       "      <td>Surgeon Simulator VR: Meet The Medic</td>\n",
       "      <td>surgeon simulator vr: meet the medic be the me...</td>\n",
       "      <td>surgeon simulator vr: meet the medic be the me...</td>\n",
       "      <td>Single-player</td>\n",
       "      <td>Action,Free to Play,Indie,Simulation</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18789</th>\n",
       "      <td>457440</td>\n",
       "      <td>Watch This!</td>\n",
       "      <td>watch this! is a first-person single player pl...</td>\n",
       "      <td>watch this! is a first-person single player pl...</td>\n",
       "      <td>Single-player,Steam Achievements,Partial Contr...</td>\n",
       "      <td>Action,Adventure,Indie</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18790</th>\n",
       "      <td>457450</td>\n",
       "      <td>Defend your Crypt</td>\n",
       "      <td>defend your crypt is a strategy and puzzle gam...</td>\n",
       "      <td>defend your crypt is a strategy and puzzle gam...</td>\n",
       "      <td>Single-player,Steam Achievements,Steam Trading...</td>\n",
       "      <td>Indie,Strategy</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18792</th>\n",
       "      <td>457480</td>\n",
       "      <td>Domino Sky</td>\n",
       "      <td>domino sky is a physics based game where you p...</td>\n",
       "      <td>domino sky is a physics based game where you p...</td>\n",
       "      <td>Single-player,Steam Achievements,Steam Trading...</td>\n",
       "      <td>Casual,Indie,Simulation,Strategy</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18793</th>\n",
       "      <td>457490</td>\n",
       "      <td>Forgotten, Not Lost - A Kinetic Novel</td>\n",
       "      <td>an old farmer lives with his wife - however, h...</td>\n",
       "      <td>an old farmer lives with his wife - however, h...</td>\n",
       "      <td>Single-player,Steam Trading Cards</td>\n",
       "      <td>Casual,RPG,Simulation</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18794</th>\n",
       "      <td>457520</td>\n",
       "      <td>Moustache Mountain</td>\n",
       "      <td>it is said, that an ancient civilization once ...</td>\n",
       "      <td>it is said, that an ancient civilization once ...</td>\n",
       "      <td>Single-player,Steam Achievements,Full controll...</td>\n",
       "      <td>Action,Casual,Indie</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18795</th>\n",
       "      <td>457530</td>\n",
       "      <td>My Lady</td>\n",
       "      <td>you are miss bauxmont, the heiress to the baux...</td>\n",
       "      <td>you are miss bauxmont, the heiress to the baux...</td>\n",
       "      <td>Single-player,Steam Achievements,Captions avai...</td>\n",
       "      <td>Casual,Indie,Simulation</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18797</th>\n",
       "      <td>457570</td>\n",
       "      <td>Camp Sunshine</td>\n",
       "      <td>camp sunshine is a 16-bit blood-soaked horror ...</td>\n",
       "      <td>camp sunshine is a 16-bit blood-soaked horror ...</td>\n",
       "      <td>Single-player,Steam Achievements,Partial Contr...</td>\n",
       "      <td>Action,Adventure,Casual,Indie,RPG</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18798</th>\n",
       "      <td>457580</td>\n",
       "      <td>The Visitor</td>\n",
       "      <td>the visitor is a vr only horror experience abo...</td>\n",
       "      <td>the visitor is a vr only horror experience abo...</td>\n",
       "      <td>Single-player</td>\n",
       "      <td>Casual,Indie</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18799</th>\n",
       "      <td>457690</td>\n",
       "      <td>Hotel Blind</td>\n",
       "      <td>hotel blind is a simulator of a blind person i...</td>\n",
       "      <td>hotel blind is a simulator of a blind person i...</td>\n",
       "      <td>Single-player,Steam Achievements,Partial Contr...</td>\n",
       "      <td>Casual,Indie,Simulation</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18800</th>\n",
       "      <td>457710</td>\n",
       "      <td>Road Madness</td>\n",
       "      <td>in the 21st century, the world is occurred by ...</td>\n",
       "      <td>in the 21st century, the world is occurred by ...</td>\n",
       "      <td>Single-player,Steam Achievements,Steam Trading...</td>\n",
       "      <td>Action,Racing</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18801</th>\n",
       "      <td>457790</td>\n",
       "      <td>Capria: Magic of the Elements</td>\n",
       "      <td>capria: magic of the elements is a first-perso...</td>\n",
       "      <td>capria: magic of the elements is a first-perso...</td>\n",
       "      <td>Single-player</td>\n",
       "      <td>Action,Casual,Indie,Early Access</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18803</th>\n",
       "      <td>457820</td>\n",
       "      <td>Outrage</td>\n",
       "      <td>outrage is a short cyberpunk dungeon crawler. ...</td>\n",
       "      <td>outrage is a short cyberpunk dungeon crawler. ...</td>\n",
       "      <td>Single-player,Steam Achievements,Steam Trading...</td>\n",
       "      <td>Adventure,Indie,RPG</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18807</th>\n",
       "      <td>457860</td>\n",
       "      <td>Apollo 11 VR</td>\n",
       "      <td>apollo 11 vr is the story of the greatest jour...</td>\n",
       "      <td>apollo 11 vr is the story of the greatest jour...</td>\n",
       "      <td>Single-player</td>\n",
       "      <td>Adventure,Simulation</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18808</th>\n",
       "      <td>457870</td>\n",
       "      <td>Minigame Party VR</td>\n",
       "      <td>what is minigame party vr?minigame party vr is...</td>\n",
       "      <td>what is minigame party vr?minigame party vr is...</td>\n",
       "      <td>Single-player</td>\n",
       "      <td>Action,Casual,Indie</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18809</th>\n",
       "      <td>457930</td>\n",
       "      <td>Starship: Nova Strike</td>\n",
       "      <td>we have been waiting for you commander. the dz...</td>\n",
       "      <td>we have been waiting for you commander. the dz...</td>\n",
       "      <td>Single-player</td>\n",
       "      <td>Action,Casual,Indie</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18810</th>\n",
       "      <td>457940</td>\n",
       "      <td>Krog Wars</td>\n",
       "      <td>a new action game that can be played in 2d mod...</td>\n",
       "      <td>a new action game that can be played in 2d mod...</td>\n",
       "      <td>Single-player</td>\n",
       "      <td>Action,Casual,Indie</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18811</th>\n",
       "      <td>457960</td>\n",
       "      <td>Holopoint</td>\n",
       "      <td>holopoint is pure archery madness. fight your ...</td>\n",
       "      <td>holopoint is pure archery madness. fight your ...</td>\n",
       "      <td>Single-player,Full controller support</td>\n",
       "      <td>Action,Indie,Simulation,Sports</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18812</th>\n",
       "      <td>458030</td>\n",
       "      <td>StarFringe: Adversus</td>\n",
       "      <td>this is the story about the beginning of the c...</td>\n",
       "      <td>this is the story about the beginning of the c...</td>\n",
       "      <td>Single-player,Steam Achievements</td>\n",
       "      <td>Strategy,Early Access</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18818</th>\n",
       "      <td>458290</td>\n",
       "      <td>Space Bit Attack</td>\n",
       "      <td>notice: made for vrspace bit attack was made w...</td>\n",
       "      <td>the galaxy needs you! transport yourself into ...</td>\n",
       "      <td>Single-player,Full controller support</td>\n",
       "      <td>Action,Indie</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18822</th>\n",
       "      <td>458370</td>\n",
       "      <td>VR Baseball - Home Run Derby</td>\n",
       "      <td>there is no feeling greater than stepping up t...</td>\n",
       "      <td>there is no feeling greater than stepping up t...</td>\n",
       "      <td>Single-player,Full controller support,VR Support</td>\n",
       "      <td>Indie,Sports</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18823</th>\n",
       "      <td>458420</td>\n",
       "      <td>Last Heroes 3</td>\n",
       "      <td>presentationlast heroes is an rpg developed by...</td>\n",
       "      <td>presentationlast heroes is an rpg developed by...</td>\n",
       "      <td>Single-player,Full controller support,Steam Tr...</td>\n",
       "      <td>Adventure,Casual,Indie,RPG,Strategy</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18825</th>\n",
       "      <td>458700</td>\n",
       "      <td>Cursor Challenge</td>\n",
       "      <td>do you want to test your skills and your refle...</td>\n",
       "      <td>do you want to test your skills and your refle...</td>\n",
       "      <td>Single-player,Co-op</td>\n",
       "      <td>Casual,Indie</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18830</th>\n",
       "      <td>458900</td>\n",
       "      <td>Julai</td>\n",
       "      <td>julai - is an arcade flight shooter.the action...</td>\n",
       "      <td>julai - is an arcade flight shooter.the action...</td>\n",
       "      <td>Single-player</td>\n",
       "      <td>Action,Casual,Indie,Simulation</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18833</th>\n",
       "      <td>459100</td>\n",
       "      <td>Epsilon corp.</td>\n",
       "      <td>epsilon is a secret community. there are a lot...</td>\n",
       "      <td>epsilon is a secret community. there are a lot...</td>\n",
       "      <td>Single-player</td>\n",
       "      <td>Action,Adventure,Indie</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18834</th>\n",
       "      <td>459260</td>\n",
       "      <td>Bowslinger</td>\n",
       "      <td>disclaimer: this game requires an htc vive to ...</td>\n",
       "      <td>disclaimer: this game requires an htc vive to ...</td>\n",
       "      <td>Single-player</td>\n",
       "      <td>Casual,Indie,Sports</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18835</th>\n",
       "      <td>459310</td>\n",
       "      <td>The Hero Project: Redemption Season</td>\n",
       "      <td>america's #1 reality show for heroes is back f...</td>\n",
       "      <td>america's #1 reality show for heroes is back f...</td>\n",
       "      <td>Single-player,Steam Achievements,Captions avai...</td>\n",
       "      <td>Adventure,Indie,RPG</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18837</th>\n",
       "      <td>459630</td>\n",
       "      <td>R.C. Bot Inc.</td>\n",
       "      <td>energy and money: iridium. the race has begun!...</td>\n",
       "      <td>energy and money: iridium. the race has begun!...</td>\n",
       "      <td>Single-player,Steam Achievements,Full controll...</td>\n",
       "      <td>Action,Casual,Indie,Simulation,Strategy</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18841</th>\n",
       "      <td>460150</td>\n",
       "      <td>One Last Chance</td>\n",
       "      <td>do you remember that high school crush you nev...</td>\n",
       "      <td>do you remember that high school crush you nev...</td>\n",
       "      <td>Single-player</td>\n",
       "      <td>Casual,Indie,Simulation</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>8520 rows × 6 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        appid                                   name  \\\n",
       "2          30                          Day of Defeat   \n",
       "3          40                     Deathmatch Classic   \n",
       "4          50              Half-Life: Opposing Force   \n",
       "5          60                               Ricochet   \n",
       "6          70                              Half-Life   \n",
       "7          80         Counter-Strike: Condition Zero   \n",
       "10        130                  Half-Life: Blue Shift   \n",
       "13        220                            Half-Life 2   \n",
       "14        240                 Counter-Strike: Source   \n",
       "15        280                      Half-Life: Source   \n",
       "16        300                  Day of Defeat: Source   \n",
       "17        320                Half-Life 2: Deathmatch   \n",
       "18        340                Half-Life 2: Lost Coast   \n",
       "19        360           Half-Life Deathmatch: Source   \n",
       "20        380               Half-Life 2: Episode One   \n",
       "21        400                                 Portal   \n",
       "23        420               Half-Life 2: Episode Two   \n",
       "24        440                        Team Fortress 2   \n",
       "25        500                            Left 4 Dead   \n",
       "26        550                          Left 4 Dead 2   \n",
       "27        570                                 Dota 2   \n",
       "28        620                               Portal 2   \n",
       "29        630                            Alien Swarm   \n",
       "31        730       Counter-Strike: Global Offensive   \n",
       "108      1002                       Rag Doll Kung Fu   \n",
       "110      1200          Red Orchestra: Ostfront 41-45   \n",
       "112      1250                          Killing Floor   \n",
       "116      1300                SiN Episodes: Emergence   \n",
       "119      1500                               Darwinia   \n",
       "121      1510                                 Uplink   \n",
       "...       ...                                    ...   \n",
       "18786  457230      Atlas Reactor VR Character Viewer   \n",
       "18788  457420   Surgeon Simulator VR: Meet The Medic   \n",
       "18789  457440                            Watch This!   \n",
       "18790  457450                      Defend your Crypt   \n",
       "18792  457480                             Domino Sky   \n",
       "18793  457490  Forgotten, Not Lost - A Kinetic Novel   \n",
       "18794  457520                     Moustache Mountain   \n",
       "18795  457530                                My Lady   \n",
       "18797  457570                          Camp Sunshine   \n",
       "18798  457580                            The Visitor   \n",
       "18799  457690                            Hotel Blind   \n",
       "18800  457710                           Road Madness   \n",
       "18801  457790          Capria: Magic of the Elements   \n",
       "18803  457820                                Outrage   \n",
       "18807  457860                           Apollo 11 VR   \n",
       "18808  457870                      Minigame Party VR   \n",
       "18809  457930                  Starship: Nova Strike   \n",
       "18810  457940                              Krog Wars   \n",
       "18811  457960                              Holopoint   \n",
       "18812  458030                   StarFringe: Adversus   \n",
       "18818  458290                       Space Bit Attack   \n",
       "18822  458370           VR Baseball - Home Run Derby   \n",
       "18823  458420                          Last Heroes 3   \n",
       "18825  458700                       Cursor Challenge   \n",
       "18830  458900                                  Julai   \n",
       "18833  459100                          Epsilon corp.   \n",
       "18834  459260                             Bowslinger   \n",
       "18835  459310    The Hero Project: Redemption Season   \n",
       "18837  459630                          R.C. Bot Inc.   \n",
       "18841  460150                        One Last Chance   \n",
       "\n",
       "                                    detailed_description  \\\n",
       "2      enlist in an intense brand of axis vs. allied ...   \n",
       "3      enjoy fast-paced multiplayer gaming with death...   \n",
       "4      return to the black mesa research facility as ...   \n",
       "5      a futuristic action game that challenges your ...   \n",
       "6      named game of the year by over 50 publications...   \n",
       "7      with its extensive tour of duty campaign, a ne...   \n",
       "10     made by gearbox software and originally releas...   \n",
       "13     1998. half-life sends a shock through the game...   \n",
       "14     the next installment of the world's # 1 online...   \n",
       "15     winner of over 50 game of the year awards, hal...   \n",
       "16     day of defeat offers intense online action gam...   \n",
       "17     fast multiplayer action set in the half-life 2...   \n",
       "18     originally planned as a section of the highway...   \n",
       "19     half-life deathmatch: source is a recreation o...   \n",
       "20     half-life 2 has sold over 4 million copies wor...   \n",
       "21     portal is a new single player game from valve....   \n",
       "23     half-life 2: episode two is the second in a tr...   \n",
       "24     the tough break update is now available!about ...   \n",
       "25     steam big pictureabout the gamefrom valve (the...   \n",
       "26     set in the zombie apocalypse, left 4 dead 2 (l...   \n",
       "27     dota is a competitive game of action and strat...   \n",
       "28     portal 2 draws from the award-winning formula ...   \n",
       "29     alien swarm is a game and source sdk release f...   \n",
       "31     counter-strike: global offensive (cs: go) will...   \n",
       "108    featuring a wide collection of single and mult...   \n",
       "110    fight in the theatre of war that changed the w...   \n",
       "112    steam halloween sale - kf and all dlc - 75% of...   \n",
       "116    you are john blade, commander of hardcorps, an...   \n",
       "119    combining fast-paced action with strategic bat...   \n",
       "121    you play an uplink agent who makes a living by...   \n",
       "...                                                  ...   \n",
       "18786  outwit to outlive in atlas reactor, the genre-...   \n",
       "18788  surgeon simulator vr: meet the medic be the me...   \n",
       "18789  watch this! is a first-person single player pl...   \n",
       "18790  defend your crypt is a strategy and puzzle gam...   \n",
       "18792  domino sky is a physics based game where you p...   \n",
       "18793  an old farmer lives with his wife - however, h...   \n",
       "18794  it is said, that an ancient civilization once ...   \n",
       "18795  you are miss bauxmont, the heiress to the baux...   \n",
       "18797  camp sunshine is a 16-bit blood-soaked horror ...   \n",
       "18798  the visitor is a vr only horror experience abo...   \n",
       "18799  hotel blind is a simulator of a blind person i...   \n",
       "18800  in the 21st century, the world is occurred by ...   \n",
       "18801  capria: magic of the elements is a first-perso...   \n",
       "18803  outrage is a short cyberpunk dungeon crawler. ...   \n",
       "18807  apollo 11 vr is the story of the greatest jour...   \n",
       "18808  what is minigame party vr?minigame party vr is...   \n",
       "18809  we have been waiting for you commander. the dz...   \n",
       "18810  a new action game that can be played in 2d mod...   \n",
       "18811  holopoint is pure archery madness. fight your ...   \n",
       "18812  this is the story about the beginning of the c...   \n",
       "18818  notice: made for vrspace bit attack was made w...   \n",
       "18822  there is no feeling greater than stepping up t...   \n",
       "18823  presentationlast heroes is an rpg developed by...   \n",
       "18825  do you want to test your skills and your refle...   \n",
       "18830  julai - is an arcade flight shooter.the action...   \n",
       "18833  epsilon is a secret community. there are a lot...   \n",
       "18834  disclaimer: this game requires an htc vive to ...   \n",
       "18835  america's #1 reality show for heroes is back f...   \n",
       "18837  energy and money: iridium. the race has begun!...   \n",
       "18841  do you remember that high school crush you nev...   \n",
       "\n",
       "                                          about_the_game  \\\n",
       "2      enlist in an intense brand of axis vs. allied ...   \n",
       "3      enjoy fast-paced multiplayer gaming with death...   \n",
       "4      return to the black mesa research facility as ...   \n",
       "5      a futuristic action game that challenges your ...   \n",
       "6      named game of the year by over 50 publications...   \n",
       "7      with its extensive tour of duty campaign, a ne...   \n",
       "10     made by gearbox software and originally releas...   \n",
       "13     1998. half-life sends a shock through the game...   \n",
       "14     the next installment of the world's # 1 online...   \n",
       "15     winner of over 50 game of the year awards, hal...   \n",
       "16     day of defeat offers intense online action gam...   \n",
       "17     fast multiplayer action set in the half-life 2...   \n",
       "18     originally planned as a section of the highway...   \n",
       "19     half-life deathmatch: source is a recreation o...   \n",
       "20     half-life 2 has sold over 4 million copies wor...   \n",
       "21     portal is a new single player game from valve....   \n",
       "23     half-life 2: episode two is the second in a tr...   \n",
       "24     \"the most fun you can have online\" - pc gamer ...   \n",
       "25     from valve (the creators of counter-strike, ha...   \n",
       "26     set in the zombie apocalypse, left 4 dead 2 (l...   \n",
       "27     dota is a competitive game of action and strat...   \n",
       "28     portal 2 draws from the award-winning formula ...   \n",
       "29     alien swarm is a game and source sdk release f...   \n",
       "31     counter-strike: global offensive (cs: go) will...   \n",
       "108    featuring a wide collection of single and mult...   \n",
       "110    fight in the theatre of war that changed the w...   \n",
       "112    killing floor is a co-op survival horror fps s...   \n",
       "116    you are john blade, commander of hardcorps, an...   \n",
       "119    combining fast-paced action with strategic bat...   \n",
       "121    you play an uplink agent who makes a living by...   \n",
       "...                                                  ...   \n",
       "18786  outwit to outlive in atlas reactor, the genre-...   \n",
       "18788  surgeon simulator vr: meet the medic be the me...   \n",
       "18789  watch this! is a first-person single player pl...   \n",
       "18790  defend your crypt is a strategy and puzzle gam...   \n",
       "18792  domino sky is a physics based game where you p...   \n",
       "18793  an old farmer lives with his wife - however, h...   \n",
       "18794  it is said, that an ancient civilization once ...   \n",
       "18795  you are miss bauxmont, the heiress to the baux...   \n",
       "18797  camp sunshine is a 16-bit blood-soaked horror ...   \n",
       "18798  the visitor is a vr only horror experience abo...   \n",
       "18799  hotel blind is a simulator of a blind person i...   \n",
       "18800  in the 21st century, the world is occurred by ...   \n",
       "18801  capria: magic of the elements is a first-perso...   \n",
       "18803  outrage is a short cyberpunk dungeon crawler. ...   \n",
       "18807  apollo 11 vr is the story of the greatest jour...   \n",
       "18808  what is minigame party vr?minigame party vr is...   \n",
       "18809  we have been waiting for you commander. the dz...   \n",
       "18810  a new action game that can be played in 2d mod...   \n",
       "18811  holopoint is pure archery madness. fight your ...   \n",
       "18812  this is the story about the beginning of the c...   \n",
       "18818  the galaxy needs you! transport yourself into ...   \n",
       "18822  there is no feeling greater than stepping up t...   \n",
       "18823  presentationlast heroes is an rpg developed by...   \n",
       "18825  do you want to test your skills and your refle...   \n",
       "18830  julai - is an arcade flight shooter.the action...   \n",
       "18833  epsilon is a secret community. there are a lot...   \n",
       "18834  disclaimer: this game requires an htc vive to ...   \n",
       "18835  america's #1 reality show for heroes is back f...   \n",
       "18837  energy and money: iridium. the race has begun!...   \n",
       "18841  do you remember that high school crush you nev...   \n",
       "\n",
       "                                              categories  \\\n",
       "2                  Multi-player,Valve Anti-Cheat enabled   \n",
       "3                  Multi-player,Valve Anti-Cheat enabled   \n",
       "4      Single-player,Multi-player,Valve Anti-Cheat en...   \n",
       "5                  Multi-player,Valve Anti-Cheat enabled   \n",
       "6      Single-player,Multi-player,Valve Anti-Cheat en...   \n",
       "7      Single-player,Multi-player,Valve Anti-Cheat en...   \n",
       "10                                         Single-player   \n",
       "13     Single-player,Steam Achievements,Steam Trading...   \n",
       "14     Multi-player,Cross-Platform Multiplayer,Steam ...   \n",
       "15                                         Single-player   \n",
       "16     Multi-player,Cross-Platform Multiplayer,Steam ...   \n",
       "17     Multi-player,Valve Anti-Cheat enabled,Includes...   \n",
       "18                    Single-player,Commentary available   \n",
       "19                 Multi-player,Valve Anti-Cheat enabled   \n",
       "20     Single-player,Steam Achievements,Captions avai...   \n",
       "21     Single-player,Steam Achievements,Captions avai...   \n",
       "23     Single-player,Steam Achievements,Captions avai...   \n",
       "24     Multi-player,Cross-Platform Multiplayer,Steam ...   \n",
       "25     Single-player,Multi-player,Co-op,Steam Achieve...   \n",
       "26     Single-player,Multi-player,Co-op,Steam Achieve...   \n",
       "27     Multi-player,Co-op,Steam Trading Cards,Steam W...   \n",
       "28     Single-player,Co-op,Steam Achievements,Full co...   \n",
       "29     Single-player,Multi-player,Co-op,Steam Achieve...   \n",
       "31     Multi-player,Steam Achievements,Full controlle...   \n",
       "108                           Single-player,Multi-player   \n",
       "110    Multi-player,Steam Achievements,Valve Anti-Che...   \n",
       "112    Single-player,Multi-player,Cross-Platform Mult...   \n",
       "116                                  Single-player,Stats   \n",
       "119                                        Single-player   \n",
       "121                                        Single-player   \n",
       "...                                                  ...   \n",
       "18786                                      Single-player   \n",
       "18788                                      Single-player   \n",
       "18789  Single-player,Steam Achievements,Partial Contr...   \n",
       "18790  Single-player,Steam Achievements,Steam Trading...   \n",
       "18792  Single-player,Steam Achievements,Steam Trading...   \n",
       "18793                  Single-player,Steam Trading Cards   \n",
       "18794  Single-player,Steam Achievements,Full controll...   \n",
       "18795  Single-player,Steam Achievements,Captions avai...   \n",
       "18797  Single-player,Steam Achievements,Partial Contr...   \n",
       "18798                                      Single-player   \n",
       "18799  Single-player,Steam Achievements,Partial Contr...   \n",
       "18800  Single-player,Steam Achievements,Steam Trading...   \n",
       "18801                                      Single-player   \n",
       "18803  Single-player,Steam Achievements,Steam Trading...   \n",
       "18807                                      Single-player   \n",
       "18808                                      Single-player   \n",
       "18809                                      Single-player   \n",
       "18810                                      Single-player   \n",
       "18811              Single-player,Full controller support   \n",
       "18812                   Single-player,Steam Achievements   \n",
       "18818              Single-player,Full controller support   \n",
       "18822   Single-player,Full controller support,VR Support   \n",
       "18823  Single-player,Full controller support,Steam Tr...   \n",
       "18825                                Single-player,Co-op   \n",
       "18830                                      Single-player   \n",
       "18833                                      Single-player   \n",
       "18834                                      Single-player   \n",
       "18835  Single-player,Steam Achievements,Captions avai...   \n",
       "18837  Single-player,Steam Achievements,Full controll...   \n",
       "18841                                      Single-player   \n",
       "\n",
       "                                        genres  \n",
       "2                                       Action  \n",
       "3                                       Action  \n",
       "4                                       Action  \n",
       "5                                       Action  \n",
       "6                                       Action  \n",
       "7                                       Action  \n",
       "10                                      Action  \n",
       "13                                      Action  \n",
       "14                                      Action  \n",
       "15                                      Action  \n",
       "16                                      Action  \n",
       "17                                      Action  \n",
       "18                                      Action  \n",
       "19                                      Action  \n",
       "20                                      Action  \n",
       "21                                      Action  \n",
       "23                                      Action  \n",
       "24                         Action,Free to Play  \n",
       "25                                      Action  \n",
       "26                                      Action  \n",
       "27                Action,Free to Play,Strategy  \n",
       "28                            Action,Adventure  \n",
       "29                                      Action  \n",
       "31                                      Action  \n",
       "108                                      Indie  \n",
       "110                                     Action  \n",
       "112                                     Action  \n",
       "116                                     Action  \n",
       "119                             Indie,Strategy  \n",
       "121                             Indie,Strategy  \n",
       "...                                        ...  \n",
       "18786                                 Strategy  \n",
       "18788     Action,Free to Play,Indie,Simulation  \n",
       "18789                   Action,Adventure,Indie  \n",
       "18790                           Indie,Strategy  \n",
       "18792         Casual,Indie,Simulation,Strategy  \n",
       "18793                    Casual,RPG,Simulation  \n",
       "18794                      Action,Casual,Indie  \n",
       "18795                  Casual,Indie,Simulation  \n",
       "18797        Action,Adventure,Casual,Indie,RPG  \n",
       "18798                             Casual,Indie  \n",
       "18799                  Casual,Indie,Simulation  \n",
       "18800                            Action,Racing  \n",
       "18801         Action,Casual,Indie,Early Access  \n",
       "18803                      Adventure,Indie,RPG  \n",
       "18807                     Adventure,Simulation  \n",
       "18808                      Action,Casual,Indie  \n",
       "18809                      Action,Casual,Indie  \n",
       "18810                      Action,Casual,Indie  \n",
       "18811           Action,Indie,Simulation,Sports  \n",
       "18812                    Strategy,Early Access  \n",
       "18818                             Action,Indie  \n",
       "18822                             Indie,Sports  \n",
       "18823      Adventure,Casual,Indie,RPG,Strategy  \n",
       "18825                             Casual,Indie  \n",
       "18830           Action,Casual,Indie,Simulation  \n",
       "18833                   Action,Adventure,Indie  \n",
       "18834                      Casual,Indie,Sports  \n",
       "18835                      Adventure,Indie,RPG  \n",
       "18837  Action,Casual,Indie,Simulation,Strategy  \n",
       "18841                  Casual,Indie,Simulation  \n",
       "\n",
       "[8520 rows x 6 columns]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# no need for this because it's just games now\n",
    "df = df.drop(['type'],axis=1)\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(8520, 6)"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = df.reset_index().drop(['index'],axis=1)\n",
    "df.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "df.to_csv(\"../../data/steam/data.clean.csv\",index=False,index_label=False)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
